function homeCtrl($scope, $route, $rootScope, $timeout, commonService, $location, $sce) {

    _log('### homeCtrl ###');
    $rootScope.showImageSlider = true;

    // var for keeping to show on page
    $scope.homeData = {
        aboutme: '',
        properties: ''
    };

    $scope.renderHtml = function(html_code) {
        return $sce.trustAsHtml(html_code);
    };
    $scope.renderHeader = function(txt) {
        return txt.length > 20 ? txt.substr(0, 20) + '...' : txt;
    };
    $scope.renderDetail = function(txt) {
        return txt.length > 80 ? txt.substr(0, 80) + '...' : txt;
    };

    // init value
    var url = 'content_ws.php';
    var params = {
        wsname: 'getcontentbyid',
        id: 1,
        token: _pageData.tokenKey
    };

    // show about me
    $.getJSON(_COMMON.context + url, params).done(function(result) {
        $scope.$apply(function() {

            $scope.homeData.aboutme = result.contents;

        });
    });

    // show properties
    params.id = 2;
    $.getJSON(_COMMON.context + url, params).done(function(result) {
        $scope.$apply(function() {

            $scope.homeData.properties = result.contents;

        });
    });
    
    _pageData.slideImageArr = [];
    var params2 = {
		wsname : 'getcontentbyid',
		id : 38, // TODO // Slider
		token : _pageData.tokenKey
	    };
	    $.getJSON(_COMMON.context + url, params2).done(function(result) {
		$scope.$apply(function() {
		    _pageData.slider = result.contents;
		    
	    	    $timeout(function() {
	        	 var el = $('#hidden-img img');
	    		 $.each( el, function( key, value ) {
	    		     var s = $(this).attr('src');
	    		     _pageData.slideImageArr.push(s);
	    		 });
	    		 
	    		 setTimeout(function () {
	    	            _COMMON.renderSlide();
	    	            _COMMON.renderMenu();
	    	        }, 100);
	    		 
	    	    },1000);
	    	    
		});
	    });
    
    

    // remove effect time loading
    _COMMON.loading(null, 0);

}
